package code.juc.threadlocal;

import lombok.SneakyThrows;

import java.util.concurrent.TimeUnit;

public class ThreadA extends Thread {

    @SneakyThrows
    @Override
    public void run() {
        // ThreadLocal
        // System.out.println("Thread A : " + ThreadLocalTool.tool.get());

        // InheritableThreadLocal
        while (true) {
            System.out.println("Thread A: " + InheritableThreadLocalTool.localExt.get());
            TimeUnit.SECONDS.sleep(1);
        }
    }
}
